﻿from Position import *

class NPC(Position):
    """Instancia um personagem no jogo. 
    Personagens sao tratados como inimigos, atacando e sendo atacados.
    Gera a classe Jogador."""

    def __init__(self, nameP = "NULL", levelP = 1, 
                 hpP = 1, hpMaxP = 1, mpP = 1, mpMaxP = 1, 
                 atkBaseP = 1, defBaseP = 1, dodgeBaseP = 0.0, 
                 filecharP = None, moveSpeedP = 1.0,
                 isAttackingP = False, attackDelayP = 1.0, attackWaitP = 0.0, typeP = 1,
                 xP = 0, yP = 0 , orientation = "down"):
        '''Instancia um NPC no jogo. Personagem generico:
        nome:NULL, level:1
        hp:1/1, mp:1/1
        atk:1, def:1, dodge:0.0
        filechar:NULL, moveSpeed:1.0
        notAttacking, x:0, y:0, Orientation:down'''
        self._name = nameP
        self._level = levelP
        self._hp = hpP
        self._hpMax = hpMaxP
        self._mp = mpP
        self._mpMax = mpMaxP
        self._atkBase = atkBaseP
        self._defBase = defBaseP
        self._dodgeBase = dodgeBaseP
        self._filechar = filecharP
        self._moveSpeed = moveSpeedP
        self._isAttacking = isAttackingP
        self._attackWait = attackWaitP
        self._attackDelay = attackDelayP
        self._type = typeP
        #From Position
        self._x = xP
        self._y = yP
        self._orientation = orientation
    
    def getName(self):
        '''==> x.name'''
        return self._name
    def setName(self, nameP):
        '''x.name = nameP'''
        self._name = nameP

    def getLevel(self):
        '''==> x.level'''
        return self._level
    def setLevel(self, levelP):
        '''x.name = nameP'''
        self._level = levelP

    def getHp(self):
        '''==> x.hp'''
        return self._hp
    def setHp(self, hpP):
        '''x.name = nameP'''
        self._hp = hpP

    def getHpMax(self):
        '''==> x.hpMax'''
        return self._hpMax
    def setHpMax(self, hpMaxP):
        '''x.name = nameP'''
        self._hpMax = hpMaxP
    
    def getMp(self):
        '''==> x.mp'''
        return self._mp
    def setMp(self, mpP):
        '''x.name = nameP'''
        self._mp = mpP

    def getMpMax(self):
        '''==> x.mpMax'''
        return self._mpMax
    def setMpMax(self, mpMaxP):
        '''x.name = nameP'''
        self._mpMax = mpMaxP

    def getAtkBase(self):
        '''==> x.atkBase'''
        return self._atkBase
    def setAtkBase(self, atkBaseP):
        '''x.name = nameP'''
        self._atkBase = atkBaseP

    def getDefBase(self):
        '''==> x.defBase'''
        return self._defBase
    def setDefBase(self, defBaseP):
        '''x.name = nameP'''
        self._defBase = defBaseP

    def getDodgeBase(self):
        '''==> x.dodgeBase'''
        return self._dodgeBase
    def setDodgeBase(self, dodgeBaseP):
        '''x.name = nameP'''
        self._dodgeBase = dodgeBaseP

    def getFilechar(self):
        '''==> x.filechar'''
        return self._filechar
    def setFilechar(self, filecharP):
        '''x.filechar = filecharP'''
        self._filechar = filecharP

    def getMoveSpeed(self):
        '''==> x.moveSpeed'''
        return self._moveSpeed
    def setMoveSpeed(self, moveSpeedP):
        '''x.name = nameP'''
        self._moveSpeed = moveSpeedP

    def getIsAttacking(self):
        '''==> x.isAttacking'''
        return self._isAttacking
    def setIsAttacking(self, isAttackingP):
        '''x.isAttacking = isAttackingP'''
        self._isAttacking = isAttackingP

    def getAttackWait(self):
        '''==> x.isAttacking'''
        return self._attackWait
    def setAttackWait(self, attackWaitP):
        '''x.isAttacking = isAttackingP'''
        self._attackWait = attackWaitP

    def getAttackDelay(self):
        '''==> x.attackDelay'''
        return self._attackDelay
    def setAttackDelay(self, attackDelayP):
        '''x.attackDelay = attackDelayP'''
        self._attackDelay = attackDelayP

    def getType(self):
        '''==> x.type'''
        return self._type
    def setType(self, typeP):
        '''x.type = typeP'''
        self._type = typeP